<?php 

include "scripts/connectDB.php";

$result = mysql_query("SELECT * FROM cwer,clan WHERE cwer.clan_id = clan.clan_id ORDER BY cw_id DESC LIMIT 5");


echo "<table border='0' cellpadding='0' cellspacing='3' class='liten'>
<tr>
<th width='20px'>#</th>
<th width='65px'>Clan</th>
<th width='30px'>Res</th>
</tr>";

while($row = mysql_fetch_array($result))
  {
  echo "<tr>";
  echo "<td>" . "<span class='cwer'>" . $row['cw_id'] . "</span>" . "</td>";
  echo "<td>" . "<center>" . $row['clan'] . "</center>" . "</td>";
  echo "<td>" . "<center>" . "<span class='win'>" . $row['win'] . "</span>";
  echo "<span class='loss'>" . $row['loss'] . "</span>";
  echo "<span class='tie'>" . $row['tie'] . "</span>" . "</center>" . "</td>";
  echo "</tr>";
  }
echo "</table>";

mysql_close($con);
?>

